package com.fesine.learn.design.pattern.creational.prototype;

import java.text.MessageFormat;

/**
 * @description: 类描述
 * @author: fesine
 * @createTime:2019/4/13
 * @update:修改内容
 * @author: fesine
 * @updateTime:2019/4/13
 */
public class MailUtil {

    public static void sendMail(Mail mail){
        String outputContent="向{0}同学，邮箱地址：{1}，发送邮件内容：{2}";
        System.out.println(MessageFormat.format(outputContent, mail.getName(),
                mail.getMailAddress(), mail.getContent()));
    }

    public static void saveOriginMailRecord(Mail mail){
        System.out.println("存储originMail记录:"+mail.getContent());
    }
}
